﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp4
{
    class Program
    {
        static void Main(string[] args)
        {
            a();
        }
        static void a()
        {
            Console.WriteLine("请输入正确数字：1.两整数相加 2.两小数相加 3.两字符串相加 4.1到指定整数的和");
            int a = int.Parse(Console.ReadLine());
            zhengshu z = new zhengshu();
            xiaoshu xs = new xiaoshu();
            zfc zfc = new zfc();
            SumUtils s = new SumUtils ();
            switch (a)
            {
                case 1:
                    Console.WriteLine("请输入两个整数：");
                    z.a = int.Parse(Console.ReadLine());
                    z.b = int.Parse(Console.ReadLine());
                    z.xiangjia();
                    break;
                case 2:
                    Console.WriteLine("请输入两个小数：");
                    xs.a = double.Parse(Console.ReadLine());
                    xs.b = double.Parse(Console.ReadLine());
                    xs.xiangjia();
                    break;
                case 3:
                    Console.WriteLine("请输入两个字符串：");
                    zfc.a = Console.ReadLine();
                    zfc.b = Console.ReadLine();
                    zfc.xiangjia();
                    break;
                case 4:
                    Console.WriteLine("请输入一个整数：");
                    s.a = int.Parse(Console.ReadLine());
                    s.xiangjia();
                    break;
                    Console.WriteLine("输入错误！");
                default:
                    break;
            }
        }
    }
}
